package com.lovo.controller;

import com.lovo.result.ResponseResult;
import com.lovo.service.IOrderService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/pay")
@ResponseResult
public class PayController {
    @Resource
    private IOrderService orderService;

    @PostMapping("/weixin")
    public Object weixinPay(String orderId){
        orderService.updateStatus(orderId,1);
        //　修改商品的库存
        return null;
    }
}
